<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>我的套餐</title>
    <meta name="decorator" content="cms_default_${site.theme}"/>
    <meta name="description" content="ccjzxyxt ${site.description}"/>
    <meta name="keywords" content="ccjzxyxt ${site.keywords}"/>
    <script type="application/javascript">
        var ctxAdmin = "${ctxAdmin}";
    </script>
    <script src="${ctxStatic}/front/js/jquery_myMeal.js" type="text/javascript"></script>
    <script src="${ctxStatic}/front/js/pageMe1.js" type="text/javascript"></script>
    <script src="${ctxStatic}/front/js/pageMe2.js" type="text/javascript"></script>
</head>
<body style="background: #f8f8f8;">
<!--content-->
<div class="wrap">
    <div class="perleft">
        <ul>
            <c:if test="${user.userType ne '1'}">
                <c:forEach items="${fns:getNavMenuList()}" var="menu">
                    <li class="${requestScope.menu.id eq menu.id ? 'on' : ''}"><a
                            href="${ctxAdmin}${menu.href}?origin=front" target=""><span>${menu.name}</span></a></li>
                </c:forEach>
            </c:if>
        </ul>
    </div>
    <div class="perright">
        <sys:message content="${message}" hideMsgBox="true"/>
        <h2 class="tabtit applytit">
            <%--<i class="active">全部订单</i><i>已购订单</i><i>套餐</i>--%>
            <i class="${requestScope.tabIndex eq null || requestScope.tabIndex eq '' || requestScope.tabIndex eq '0' ? 'active' : ''}">全部订单</i>
            <i class="${requestScope.tabIndex eq '1' ? 'active' : ''}">已购订单</i>
            <i class="${requestScope.tabIndex eq '2' ? 'active' : ''}">可选套餐</i>
        </h2>
        <input id="tabIndex" name="tabIndex" type="hidden" value="${requestScope.tabIndex}">
        <form:form id="searchForm" action="" method="post">
            <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
            <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
            <input id="recordCount" name="recordCount" type="hidden" value="${page.count}"/>
            <input id="orderFlag" name="orderFlag" type="hidden" value=""/>
        </form:form>
        <div class="tabcont applycont">
            <c:forEach items="${page.list}" var="bizEcsOrder" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizEcsOrder.mealName}</h3>
                        <ul>
                            <li>
                                <p>CUP核心数</p>
                                <span>${bizEcsOrder.cpuNumber}核</span>
                            </li>
                            <li>
                                <p>内存大小</p>
                                <span>${bizEcsOrder.ramSize}G</span>
                            </li>
                            <li>
                                <p>存储大小</p>
                                <span>${bizEcsOrder.storageSize}G</span>
                            </li>
                            <li>
                                <p>使用天数</p>
                                <span>${bizEcsOrder.mealUseTime}天</span>
                            </li>
                            <li>
                                <p>价格</p>
                                <span>${bizEcsOrder.mealPrice}元</span>
                            </li>
                            <li>
                                <p>费用</p>
                                <span>${bizEcsOrder.price}元</span>
                            </li>

                            <c:if test="${bizEcsOrder.orderFlag ne '1' }">
                                <li>
                                    <p>订单支付时间</p>
                                    <span><fmt:formatDate value="${bizEcsOrder.payTime}"
                                                          pattern="yyyy-MM-dd HH:mm:ss"/></span>
                                </li>
                            </c:if>
                            <c:if test="${bizEcsOrder.orderFlag eq '1'}">
                                <li>
                                    <p>订单创建时间</p>
                                    <span><fmt:formatDate value="${bizEcsOrder.createDate}"
                                                          pattern="yyyy-MM-dd HH:mm:ss"/></span>
                                </li>
                                <li>
                                    <a href="${ctxAdmin}/biz/bizEcsOrder/orderPay?id=${bizEcsOrder.id}">支付</a>
                                    <a href="#" onclick="confirmDel('${bizEcsOrder.id}', '0')" class="bluebg">删除</a>
                                </li>
                            </c:if>
                        </ul>
                    </div>
                    <c:if test="${bizEcsOrder.orderFlag eq '1'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wzf.png"></div>
                    </c:if>
                    <c:if test="${bizEcsOrder.orderFlag eq '2'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/yzf.png"></div>
                    </c:if>
                </div>
            </c:forEach>
            <center>
                <div id="myMealPage" class="page_div"></div>
            </center>
        </div>
        <div class="tabcont applycont">
            <c:forEach items="${page.list}" var="bizEcsOrder" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizEcsOrder.mealName}</h3>
                        <ul>
                            <li>
                                <p>CUP核心数</p>
                                <span>${bizEcsOrder.cpuNumber}核</span>
                            </li>
                            <li>
                                <p>内存大小</p>
                                <span>${bizEcsOrder.ramSize}G</span>
                            </li>
                            <li>
                                <p>存储大小</p>
                                <span>${bizEcsOrder.storageSize}G</span>
                            </li>
                            <li>
                                <p>使用天数</p>
                                <span>${bizEcsOrder.mealUseTime}天</span>
                            </li>
                            <li>
                                <p>价格</p>
                                <span>${bizEcsOrder.mealPrice}元</span>
                            </li>
                            <li>
                                <p>费用</p>
                                <span>${bizEcsOrder.price}元</span>
                            </li>
                            <li>
                                <p>订单支付时间</p>
                                <span><fmt:formatDate value="${bizEcsOrder.payTime}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                        </ul>
                    </div>
                    <c:if test="${bizEcsOrder.orderFlag eq '1'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wzf.png"></div>
                    </c:if>
                    <c:if test="${bizEcsOrder.orderFlag eq '2'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/yzf.png"></div>
                    </c:if>
                </div>
            </c:forEach>
            <center>
                <div id="myMealPage1" class="page_div"></div>
            </center>
        </div>
        <form:form id="searchForm1" action="" method="post">
            <input id="pageNo1" name="pageNo1" type="hidden" value="${page1.pageNo}"/>
            <input id="pageSize1" name="pageSize1" type="hidden" value="${page1.pageSize}"/>
            <input id="recordCount1" name="recordCount1" type="hidden" value="${page1.count}"/>
        </form:form>
        <div class="tabcont applycont">
            <c:forEach items="${page1.list}" var="bizEcsSetting" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizEcsSetting.name}</h3>
                        <ul>
                            <li>
                                <p>CUP核心数</p>
                                <span>${fns:getDictLabel(bizEcsSetting.cpuNumber, "biz_ecs_cpu", "")}</span>
                            </li>
                            <li>
                                <p>内存大小</p>
                                <span>${fns:getDictLabel(bizEcsSetting.ramSize, "biz_ecs_ram", "")}</span>
                            </li>
                            <li>
                                <p>存储大小</p>
                                <span>${fns:getDictLabel(bizEcsSetting.storageSize, "biz_ecs_storage", "")}</span>
                            </li>
                            <li>
                                <p>使用天数</p>
                                <span>${bizEcsSetting.useTime}天</span>
                            </li>
                            <li>
                                <p>价格</p>
                                <span>${bizEcsSetting.price}元</span>
                            </li>
                            <li>
                                <a href="${ctxAdmin}/biz/bizEcsOrder/orderBuy?setMealId=${bizEcsSetting.id}&orderId=${fns:getUuid()}" id="modifybtn">购买</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </c:forEach>
            <center>
                <div id="myMealPage2" class="page_div"></div>
            </center>
        </div>
    </div>
</div>
</body>
</html>
